home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.19990422-19990725
/
000033_news@watsun.cc.columbia.edu _Thu May 6 11:16:41 1999.msg
< prev
next >
Wrap
Internet Message Format
|
1999-07-23
|
2KB
Return-Path: <news@watsun.cc.columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id LAA28546
for <kermit.misc@watsun.cc.columbia.edu>; Thu, 6 May 1999 11:16:41 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id LAA22211
for kermit.misc@watsun.cc.columbia.edu; Thu, 6 May 1999 11:04:43 -0400 (EDT)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Subject: Re: if... input??
Date: 6 May 1999 15:04:41 GMT
Organization: Columbia University
Message-ID: <7gsb29$lm0$1@newsmaster.cc.columbia.edu>
To: kermit.misc@watsun.cc.columbia.edu
In article <926000750.668392@rosalyn.got.telia.se>,
Per Berger <per.berger@home.se> wrote:
: I've installed ckermit 7 on a FreeBSD box and it works fine. I've made a
: script that telnet a host, run some commands and disconnects. Works great...
: However, there is one problem. One of the commands generates a listing that
: might give a "More" that needs a space to proceed.
:
Most commands that do this have a way to disable it. If the host is UNIX,
maybe you can work around it by redirecting the output, e.g.:
command > /dev/tty
: I can always put that in
: manually but I would like to have some sort of "if input = "More" then send
: space, if not proceed"
:
As noted in the manual, this is what the MINPUT command is for; it looks for
multiple targets at once.
First use "set terminal debug on" to see exactly what characters are in the
command's More prompt and in your system prompt, for example:
<carriage-return><linefeed>More?<space>
and:
<carriage-return><linefeed>$<space>
Then do something like this:
ouptut command\13 ; or, in C-Kermit 7.0 Beta.06, "lineout command"
set flag off
while not flag {
minput 10 {\13\10More? } {\13\10$ }
switch \v(minput) {
:1, output { }, break ; Got more prompt - send a space
:2, set flag on, break ; Got system prompt - done
:default, break
}
}
- Frank